Add support for required html attribute#1332
Merged
Xon merged 15 commits intoChoices-js:mainfrom Aug 16, 2025
Merged
Conversation
This was referenced Aug 15, 2025
invalidState for choicesrequired html attribute
49c0909 to
b624ad8
Compare
Collaborator
|
Thanks! This looks to be quite a straightforward change. I did a rebase and pushed and fixed some of the merge conflicts from the asset files. I'll re-enable those tests and update the image files once the e2e tests run |
Contributor
Author
|
Thanks a lot @Xon 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This feature requires updating any css targeting the
.choices [hidden]selectorThis PR adds visual feedback on required fields by adding the class
is-invalidon theinvalidevent (only when the input or select arerequired). Within achange, it will check again if our value is valid, thus removing the class.I have updated the documentation accordingly and added a test-case and an update on the index.html (commented it out in fdf07fa and 83d2b0a as I sadly can't update the screenshots 😢). /cc @Xon 😊
This fixes, supersedes and implements:
Screenshots (if appropriate)
Types of changes
Checklist